﻿<!doctype html>
 <html lang="zh-CN">
 <head>
   <meta charset="UTF-8">
   <link rel="stylesheet" href="../../../css/common.css">
   <link rel="stylesheet" href="../../../css/main.css">
   <script type="text/javascript" src="../../../js/jquery.min.js"></script>
   <script type="text/javascript" src="../../../js/colResizable-1.3.min.js"></script>
   <script type="text/javascript" src="../../../js/common.js"></script>

  <script type="text/javascript">
    function del(){
	  confirm("确认删除");
	}
	function delall(){
	  confirm("确认删除");
	}
	function excel(){
	  confirm("确认导出");
	}
  </script>
</head>
<body>
<form action="/resource/system/log/list" method="post">
     <div id="search_bar" class="mt10">
       <div class="box">
          <div class="box_border">
            <div class="box_top"><b class="pl15">搜索</b></div>
            <div class="box_center pt10 pb10">
              <table class="form_table" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td>用户名</td>
                  <td><input type="text" name="userName" value="${userName}" class="input-text lh25" size="10"></td>
                   <td>时间段</td>
                  <td><input type="date" name="operTimeBegin" value="${operTimeBegin}" class="input-text lh25" size="10">to
				  <input type="date" name="operTimeOver" value="${operTimeOver}" class="input-text lh25" size="10"></td>
                  
                   <td><input type="submit" name="button" class="btn btn82 btn_search" value="查询">
			    <input type="reset" name="button" class="btn btn82 btn_recycle" value="清空"></td>
                </tr>
               
              </table>
            </div>
        
         
			</div>  </div>
			</form>

 <div id="table" class="mt10">
        <div class="box span10 oh">
            <form action="/excelLogs" method="post">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
                    <tr>
                        <th> <input type="checkbox" id="btn1"></th>
                        <th >序号</th>
                        <th >用户名称</th>
                        <th >角色</th>
                        <th >事件</th>
                        <th>备注</th>
                        <th>操作时间</th>
                    </tr>
                    <#list  allLogs.list  as  all>
                        <tr class="tr" align="center">
                            <td class="td_center"><input type="checkbox" name="arr" value="${all.logId}"></td>
                            <td>${all_index+1}</td>
                            <td>${all.userName}</td>
                            <td>${all.roleName}</td>
                            <td>${all.logWork}</td>
                            <td>${all.logContent}</td>
                            <td>${all.operTime?datetime}</td>
                        </tr>
                    </#list>
                    <tr>
                        <td colspan="2">
                            <input type="button" name="button"  class="btn btn82 btn_export" value="导出" onclick="todaochu()">
                        </td>
                        <td colspan="5" align="right">
                            <div class="page mt10">
                                <div class="pagination">
                                    <ul >
                                        <li class="first-child"><a href="/resource/system/log/list?page=1&userName=${userName}&operTimeBegin=${operTimeBegin}&operTimeOver=${operTimeOver}">首页</a></li>

                                        <li><a href="/resource/system/log/list?page=${(allLogs.prePage==0)?string('1','${allLogs.prePage}')}&userName=${userName}&operTimeBegin=${operTimeBegin}&operTimeOver=${operTimeOver}">上一页</a></li>

                                        <#--							  <li class="active"><span>1</span></li>-->
                                        <#--							  <li><a href="#">2</a></li>-->
                                        <#--							  <li><a href="#">3</a></li>-->
                                        <#--							  <li><a href="#">4</a></li>-->
                                        <li class=""><a href="/resource/system/log/list?page=${(allLogs.nextPage==0)?string('${allLogs.pages}','${allLogs.nextPage}')}&userName=${userName}&operTimeBegin=${operTimeBegin}&operTimeOver=${operTimeOver}">下一页</a></li>
                                        <li ><a href="/resource/system/log/list?page=${allLogs.pages}&userName=${userName}&operTimeBegin=${operTimeBegin}&operTimeOver=${operTimeOver}">末页</a></li>
                                        <li ><span>共${allLogs.total}条数据</span></li>
                                        <li ><span>共${allLogs.getPages()}页</span></li>
                                    </ul>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
     </div>

</body>

<script type="text/javascript">
    $(function(){
        $("#btn1").click(function(){
            //1.得到点击按钮的状态  checked 属于js对象中的属性
            //jquery->js
            var state=$(this)[0].checked;
            //alert(state);
            //2.设置全选
            var cks=document.getElementsByName("arr");
            for(var i=0;i<cks.length;i++){
                cks[i].checked=state;
            }
        });
    })

    //提交导出
    function todaochu(){
        //设置隐藏域的值
        // document.getElementById("mymethod").value="daochu";
        //提交表单
        //  document.getElementById("myform").submit();
        document.forms[1].submit();
    }
</script>
</html>